import { createI18n } from 'vue-i18n' //引入vue-i18n组件
import messages from './index'
import { storage } from '@/utils';

const i18n = createI18n({
    fallbackLocale: 'en',
    globalInjection: true,
    legacy: false, // you must specify 'legacy: false' option
    locale: storage.getLocal('language') || 'zh',
    messages,
});

export default i18n